﻿using System.ComponentModel.DataAnnotations;

namespace OurWedding1.Models
{
    [MetadataType(typeof(GuestBuddy))]
    public partial class Guest
    {
        public override string ToString()
        {
            return FirstName + " " + LastName;
        }
        
        [ScaffoldColumn(true)]
        public string Name
        {
            get
            {
                return FirstName + " " + LastName;
            }
        }
    }

    
    public class GuestBuddy
    {
        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Guest_FirstName_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Guest_FirstName")]
        public string FirstName { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Guest_LastName_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Guest_LastName")]
        public string LastName { get; set; }

        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Guest_isHotelNeeded_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Guest_isHotelNeeded")]
// ReSharper disable InconsistentNaming
        public bool isHotelNeeded { get; set; }
// ReSharper restore InconsistentNaming
      
        [Required(ErrorMessageResourceType = typeof (Resources), ErrorMessageResourceName = "Guest_GuestGroupId_Required")]
        [Display(ResourceType = typeof (Resources), Name = "Guest_GuestGroup")]
        public int GuestGroupId { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Guest_GuestFunction")]
        public int? GuestFunctionId { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Guest_isNotIncluded")]
// ReSharper disable InconsistentNaming
        public bool isNotIncluded { get; set; }
// ReSharper restore InconsistentNaming

        [Display(ResourceType = typeof (Resources), Name = "Guest_Email")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }
        
        [Required]
        [Display(ResourceType = typeof (Resources), Name = "Guest_ParticipatesInCosts")]
        public bool ParticipatesInCosts { get; set; }

        [Required]
        [Display(ResourceType = typeof (Resources), Name = "Guest_isConfirmed")]
// ReSharper disable InconsistentNaming
        public bool isConfirmed { get; set; }
// ReSharper restore InconsistentNaming

        [Display(ResourceType = typeof (Resources), Name = "Guest_Comment")]
        [DataType(DataType.MultilineText)]
        public string Comment { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Guest_GuestFunction")]
        public virtual GuestFunction GuestFunction { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Guest_GuestGroup")]
        public virtual GuestGroup GuestGroup { get; set; }
    }
}